package com.Service.impl;

import com.Service.SubejctService;
import com.dao.SubjectMapper;
import com.entity.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SubjectImpl implements SubejctService{

    @Autowired
    private SubjectMapper subjectMapper;

    public int insert(Subject record){
        int a = subjectMapper.insert(record);
        return a;
    }

    public int delete(int id){
        int a = subjectMapper.deleteByPrimaryKey(id);
        return a;
    }

    public int update(Subject record){
        int a = subjectMapper.updateByPrimaryKey(record);
        return a;
    }
    public List<Subject> query(Subject record){
        List<Subject> schJobList = subjectMapper.selectAll();
        return schJobList;
    }
}
